import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import MusicHall from '../views/MusicHall.vue'
import Radio from '../components/MusicHall/Jump/Radio.vue'
import JumpRadio from '../components/MusicHall/Jump/JumpRadio/JumpRadio.vue'
import Jumpcomment from '../components/MusicHall/Jump/JumpRadio/Jumpcomment.vue'
import { Badge } from 'vant';
import { Icon } from 'vant';
import { Divider } from 'vant';
import Mv from '../components/MusicHall/Jump/Mv.vue'
import Singer from '../components/MusicHall/Jump/Singer.vue'
import PlayListDetail from '../components/playListDetail/PlayListDetail.vue'
import RankListDetail from '../components/Rank/RankListDetail.vue'
import Player from '../components/player/Player.vue'

Vue.use(VueRouter)
Vue.use(Badge);
Vue.use(Divider);
Vue.use(Icon)

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home,
        meta:{
            showTab:true
        }  
    },
    {
        path: '/musichall',
        name: 'MusicHall',
        component: MusicHall,
        meta:{
            showTab:true
        }  
    },
    {
        path:'/radio/:id',//动态路由
        name:'Radio',
        component:Radio,
        meta:{
            showTab:false
        }  
    },
    {
        path:'/jumpradio/:id',//动态路由
        name:'JumpRadio',
        component:JumpRadio,
        meta:{
            showTab:false
        }  
    },
    {
        path:'/jumpcomment/:id',//动态路由
        name:'Jumpcomment',
        component:Jumpcomment,
        meta:{
            showTab:false
        }  
    },
    {
        path:'/mv/:id',//动态路由
        name:'Mv',
        component:Mv,
        meta:{
            showTab:false
        }  
    },
    {
        path:'/singer/:id',//动态路由
        name:'Singer',
        component:Singer,
        meta:{
            showTab:false
        }  
    },
    {
        path: '/rank',
        name: 'Rank',
        component: () =>
            import ( /* webpackChunkName: "Rank" */ '../views/Rank.vue'),
        meta:{
            showTab:true
        }
    },
    {
        path: '/ranklistdetail/:id',
        name: 'RankListDetail',
        component: RankListDetail,
        meta:{
            showTab:false
        }    
    },
    {
        path:'/playlistdetail/:id',//动态路由
        name:'PlayListDetail',
        component:PlayListDetail,
        meta:{
            showTab:false
        }  
    },
    {
        path:'/player/:id',//动态路由
        name:'Player',
        component:Player,
        meta:{
            showTab:false
        }  
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router